Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve plural marks #3948

Closed
wants to merge 13 commits into from
Closed

Conversation

quiple
Copy link
Contributor

@quiple quiple commented May 10, 2024

This PR combines duplicate parts of plural strings. And it makes easier to localize by providing full context.

Before:

#: src/components/moderation/LabelsOnMe.tsx:57
msgid "{0, plural, one {# label has been placed on this account} other {# labels have been placed on this account}}"
msgstr ""

#: src/components/moderation/LabelsOnMe.tsx:63
msgid "{0, plural, one {# label has been placed on this content} other {# labels have been placed on this content}}"
msgstr ""

After:

#: src/components/moderation/LabelsOnMe.tsx:57
msgid "{0, plural, one {# label has} other {# labels have}} been placed on this account"
msgstr ""

#: src/components/moderation/LabelsOnMe.tsx:63
msgid "{0, plural, one {# label has} other {# labels have}} been placed on this content"
msgstr ""

@gaearon
Copy link
Collaborator

gaearon commented May 10, 2024

Hmm. I'm not sure this makes sense because it leaves less freedom to other languages to rearrange words (if needed for grammar).

@quiple
Copy link
Contributor Author

quiple commented May 10, 2024

@gaearon It looks like you can freely reposition the plural string ({0, plural, one {# label has} other {# labels have}} in the example above) or put multiple of them in <Trans>.

@quiple quiple closed this Dec 12, 2024
@quiple quiple deleted the improve-plural-marks branch December 18, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants